ceRNA_file <- \(makers, od){
    library(multiMiR)
    # mRNA-miRNA
    gene2mir <- get_multimir(
        org = "hsa",
        target = makers,
        table = "validated",
        summary = TRUE,
        predicted.cutoff = 10,
        predicted.cutoff.type = "p"
    )
    miRNA <- gene2mir@summary %>%
        dplyr::filter(mirtarbase > 0, tarbase > 0) %>%
        dplyr::select(mature_mirna_id, target_symbol)

    dim(miRNA)
    names(gene2mir@summary)
    # view(gene2mir@summary)
    # miRNA-lncRNA
    lncRNA <- data.table::fread("/Pub/Users/wangcy/project/P04_F220809002_osteoporosis/data/starBaseV3_hg19_CLIP-seq_lncRNA_all.txt")

    load("/Pub/Users/wangcy/project/P04_F220809002_osteoporosis/data/anno.Rdata", verbose = T)
    # mRNA_anno %>% head

    lncRNA <- lncRNA %>%
        dplyr::filter(
            miRNAname %in% miRNA$mature_mirna_id,
            geneID %in% str_remove(lnc_anno$gene_id, "\\.\\d"),
            degraExpNum > 0
        ) %>%
        dplyr::select(miRNAname, geneName)

    names(lncRNA) <- c("source", "target")
    names(miRNA) <- c("source", "target")

    # mRNA to TF
    trust <- read.delim("/Pub/Users/wangcy/project/P04_F220809002_osteoporosis/data/trrust_rawdata.human.tsv")
    tf <- trust %>%
        dplyr::filter(TF %in% makers | target %in% makers) %>%
        dplyr::select(TF, target) %>%
        dplyr::rename(source = TF)

    # to cytoscape
    net <- rbind(miRNA, lncRNA, tf)
    property <- tibble(
        nodes = c(
            miRNA$source,
            lncRNA$source,
            miRNA$target,
            lncRNA$target,
            tf$source,
            tf$target
        ),
        type = rep(c("miRNA", "mRNA", "lncRNA", "Transcription Factor", "mRNA"),
            times = c(
                nrow(miRNA) + nrow(lncRNA),
                nrow(miRNA),
                nrow(lncRNA),
                nrow(tf),
                nrow(tf)
            )
        )
    )
    property <- distinct(property, nodes, .keep_all = T)


    dir.create(od,recursive = T)

    write_tsv(net, file.path(od, "cys_NET.tsv"))
    write_tsv(property, file.path(od, "cys_property.tsv"))
}
